home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / g_quake / abomb6.zip / ABOMB2.QC < prev    next >
Text File  |  1996-08-12  |  2KB  |  88 lines

  1. // code author status: one line by Nick & most of the others by id & rest by me ;)
  2.  
  3. void() W_SetCurrentAmmo;
  4. void() BecomeExplosion;
  5. void(entity inflictor, entity attacker, float damage, entity ignore) T_ABombDamage;
  6.  
  7. void() ABomb_Explode =
  8. {
  9.     lightstyle(0, "m");
  10.     bprint("it's the end of the world as we know it...\n");   //Tee Hee...
  11.     self.effects=14; // EF_MUZZLEFLASH && EF_BRIGHTLIGHT && EF_DIMLIGHT
  12.     T_ABombDamage(self, self.owner, 8000, world);
  13. // 2nd "T_ABombDamage(self, self.owner, 8000, world);" might be used if wanting more reliability...
  14.  
  15.     sound (self, CHAN_WEAPON, "weapons/r_exp3.wav", 1, ATTN_NORM);
  16. // get a real a-bomb sound and put it here...
  17.  
  18. //    self.origin = self.origin - 8*normalize(self.velocity);
  19.  
  20.     WriteByte (MSG_BROADCAST, SVC_TEMPENTITY); // explosion
  21.     WriteByte (MSG_BROADCAST, TE_EXPLOSION);
  22.     WriteCoord (MSG_BROADCAST, self.origin_x);
  23.     WriteCoord (MSG_BROADCAST, self.origin_y);
  24.     WriteCoord (MSG_BROADCAST, self.origin_z);
  25.  
  26.     BecomeExplosion (); // sprite and removal of the entity...
  27. };
  28.  
  29. void() ABomb_Count1 =
  30. {
  31. //    sound (self, CHAN_WEAPON, "count1.wav", 1, ATTN_NORM);
  32.     bprint ("Q   * ONE *   Q\n\n");
  33.     self.nextthink = time + 1;
  34.     self.think = ABomb_Explode;
  35. };
  36.  
  37. void() ABomb_Count2 =
  38. {
  39. //    sound (self, CHAN_WEAPON, "count2.wav", 1, ATTN_NORM);
  40.     bprint ("q   * two *   q\n");
  41.     self.nextthink = time + 1;
  42.     self.think = ABomb_Count1;
  43. };
  44.  
  45. void() ABomb_Count3 =
  46. {
  47. //    sound (self, CHAN_WEAPON, "count3.wav", 1, ATTN_NORM);
  48.     bprint ("\nQ  * three *  Q\n");
  49.     self.nextthink = time + 1;
  50.     self.think = ABomb_Count2;
  51. };
  52.  
  53. void() ABomb_DoNothing =
  54. {
  55. //    prevent looping touch... I could use SUB_Null instead but who cares;)
  56. };
  57.  
  58. void() ABomb_Touch =
  59. {
  60.     if(other == self.owner)             //Don't explode if
  61.         return;                 //you touch it
  62. //    sound (self, CHAN_WEAPON, "count5.wav", 1, ATTN_NORM);
  63.     bprint ("\nYou have five seconds to pray\n");
  64.     self.nextthink = time + 2;
  65.     self.think = ABomb_Count3;
  66.     self.touch = ABomb_DoNothing;
  67.     lightstyle(0, "zwtqnkheba");
  68. };
  69.  
  70. void() ABomb_Count5 =
  71. {
  72. //    sound (self, CHAN_WEAPON, "count5.wav", 1, ATTN_NORM);
  73.     bprint ("\nYou have five seconds to pray\n");
  74.     self.nextthink = time + 2;
  75.     self.think = ABomb_Count3;
  76.     self.touch = ABomb_DoNothing;
  77.     lightstyle(0, "zwtqnkheba");
  78. };
  79.  
  80. void() ABomb_Count10 =
  81. {
  82. //    sound (self, CHAN_WEAPON, "endoftheworldin10seconds.wav", 1, ATTN_NORM);
  83.     bprint ("End of the world in ten seconds...\n");
  84.     self.nextthink = time + 5;
  85.     self.think = ABomb_Count5;
  86.     lightstyle(0, "zxusqomkig");
  87. };
  88.